﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        string hostName = GetHost();
        if (hostName.Contains("surelution.com"))
        {
            Server.Transfer("~/surelution/Default.aspx");
        }
        else
        {
            Server.Transfer("~/hansi/index.aspx");
        }

    }

    private string GetHost()
    {
        string hostName = Request.Headers["Host"];
        if (hostName.Contains(":"))
        {
            hostName = hostName.Substring(0, hostName.IndexOf(":"));
        }
        return hostName.ToLower();
    }
</script>